<template>
    <div id="log">
        <el-tabs v-model="curTab" type="card" >
            <el-tab-pane label="场所" name="place" >
                <placeList :placeTypeList="placeTypeList"></placeList>
            </el-tab-pane>
            <el-tab-pane label="场所巡查内容" name="type" >
                <placeTypeList @output="getPlaceTypeList" :initData="placeTypeList"></placeTypeList>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>
<script>
import placeList from './area-list'
import placeTypeList from './place-type-list'
export default {
    components:{placeList, placeTypeList},
    data(){
        return{
            curTab:'place',
			placeTypeList:[]
        }
    },
    methods: {
		getPlaceTypeList(){
			this.$http.getDictKeyList({parentCode:'fixedPlace'})
			.then((res)=>{
				this.placeTypeList=res.data.data ||[]
			}).catch((err)=>{
				throw(err)
			})
		}
       

    },
    created(){
		this.getPlaceTypeList()
       
    }

}
</script>
<style scoped lang="scss">
#log{
    height: 100%;
}

</style>
<style scoped lang="scss">
/deep/ .el-tabs{
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    .el-tabs__header{
        margin-bottom: 0px;
        .el-tabs__nav{
            width: 100%;
            border: none;
            .el-tabs__item{
                width: 150px;
                text-align:center;
                border-left: none;
                border-right: 1px solid #eee;
                &.is-active{
                    border-bottom-color:#fff;
                }
            }
        }
    }
    .el-tabs__content{
        flex: 1;
        overflow: hidden;
        .el-tab-pane{
            height: 100%;
			padding: 10px;
			box-sizing: border-box;
        }
    }
}


</style>


